<script>
    import '../../../../static/iview/components/message/index.js'
    export default {
        name: 'zMessage',
        info (options) {
            const type = typeof options;
            if (type === 'string') {
                options = {
                    content: options
                };
            }
            return notice(options.content, options.duration, 'info', options.onClose, options.closable, options.className);
        },
        success (options) {
            const type = typeof options;
            if (type === 'string') {
                options = {
                    content: options
                };
            }
            return notice(options.content, options.duration, 'success', options.onClose, options.closable, options.className);
        },
        warning (options) {
            const type = typeof options;
            if (type === 'string') {
                options = {
                    content: options
                };
            }
            return notice(options.content, options.duration, 'warning', options.onClose, options.closable, options.className);
        },
        error (options) {
            const type = typeof options;
            if (type === 'string') {
                options = {
                    content: options
                };
            }
            return notice(options.content, options.duration, 'error', options.onClose, options.closable, options.className);
        },
    }
</script>
